package com.devbobcorn.nekoration.items;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.LanguageManager;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.ITextComponent;

public class CaseTweak {
    private static LanguageManager lang = null;

    public static ITextComponent getTweaked(ITextComponent original){
        if (lang == null)
            lang = Minecraft.getInstance().getLanguageManager();
        if (lang.getSelected().getCode().equals("lol_us")){
            int num = original.hashCode();
            if (num % 10 == 3)
                return new StringTextComponent(original.getString().toUpperCase());
            else if (num % 9 == 7)
                return new StringTextComponent(original.getString().toLowerCase());
        }
        return original;
    }
}
